package com.wicket.okrcomponent.base.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wicket.okrcomponent.base.service.MOmsPlatformOperationSeparatedDataService;
import com.wicket.okrcomponent.base.service.dto.req.*;
import com.wicket.okrcomponent.common.dto.FieldInfo;
import com.wicket.okrcomponent.common.exception.BizException;
import com.wicket.okrcomponent.common.tools.StringUtils;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import com.wicket.okrcomponent.dal.mapper.mbg.OmsPlatformOperationSeparatedDataMapper;
import com.wicket.okrcomponent.dal.po.mbg.OmsPlatformOperationSeparatedData;
import java.lang.reflect.Field;
import java.util.*;
import java.util.ArrayList;
import java.util.stream.Collectors;
//import com.wicket.okrcomponent.base.service.dto.res.*;

import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ：
 * @since 2022/1/19 15:39
 *
 *
 * @version 1.0
 */
@Service
public class MOmsPlatformOperationSeparatedDataServiceImpl
  extends ServiceImpl<OmsPlatformOperationSeparatedDataMapper, OmsPlatformOperationSeparatedData>
  implements MOmsPlatformOperationSeparatedDataService {

  @Autowired
  OmsPlatformOperationSeparatedDataMapper omsPlatformOperationSeparatedDataMapper;
/**
   * M2修改租户分离数据[7206]
   * gen by moon at 6/12/2023, 11:21:02 AM
   */
 @Trace(operationName = "M2修改租户分离数据")
 @Tags({@Tag(key = "参数",value = "arg[0]"),
 @Tag(key = "返回值",value = "returnedObj")})
  @Override
  @Transactional(rollbackFor=Exception.class)
  public  boolean  updateTenantSeparationData(OmsPlatformOperationSeparatedData omsPlatformOperationSeparatedData) {
     omsPlatformOperationSeparatedData.setOperationInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID
omsPlatformOperationSeparatedData.setOperateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME
        return super.updateById(omsPlatformOperationSeparatedData);
  }
}
